
#ifndef _COLOR_LED_H_
#define _COLOR_LED_H_


#include "pwm.h"


#define NUM_COLOR_LED    20


#define LED_PWM_DUTY_L    33
#define LED_PWM_DUTY_H    85

#define LED_PWM_HIGH     0
#define LED_PWM_LOW      PWM_PERIOD_REG

#define LED_LED_RESET    LED_PWM_LOW



typedef enum
{
	LED_COLOR_OFF,
	LED_COLOR_RED,
	LED_COLOR_GREEN,
	LED_COLOR_BLUE,
	LED_COLOR_WHITE,
	LED_COLOR_ORANGE,
	LED_COLOR_PURPLE

}ENUM_LED_TYPE;


typedef union
{
	struct
	{
		uint8_t B;
		uint8_t R;
		uint8_t G;
	};
	
	uint8_t  RGB[3];
	uint32_t XRGB;

}STR_RGB_VALUE;






typedef union
{	
	struct
	{
		uint32_t B_duty[8];
		uint32_t R_duty[8];
		uint32_t G_duty[8];
	};
	
	uint32_t duty[24];
	
}STR_LED_DUTY;


void LED_color_ctrl(ENUM_LED_TYPE type, uint8_t blink_time);


#endif



